Skip to content

feat: add Japanese translations#38

Merged
ZhBF merged 1 commit intomainfrom
ja
Jan 14, 2026
Merged

feat: add Japanese translations#38
ZhBF merged 1 commit intomainfrom
ja

Conversation

@ZhBF
Copy link
Collaborator

@ZhBF ZhBF commented Jan 14, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 14, 2026 04:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive Japanese language support to the Ropy clipboard manager application, including full translations and integration with the existing i18n system.

Changes:

  • Added Japanese as a new supported language variant with proper serialization and display name
  • Created a complete Japanese translation file (ja.toml) with 63 translation keys
  • Added settings_button translation key to all locale files (en, zh-CN, ja) and updated the GUI to use it

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/i18n/mod.rs Added Japanese language enum variant, display name, inclusion in all() method, translation loading, and updated tests
assets/locales/ja.toml New file with complete Japanese translations for all application strings
assets/locales/en.toml Added missing settings_button translation key
assets/locales/zh-CN.toml Added missing settings_button translation key
src/gui/board/render.rs Updated settings button tooltip to use i18n translation instead of hardcoded string

let content = match language {
Language::English => include_str!("../../assets/locales/en.toml"),
Language::ChineseSimplified => include_str!("../../assets/locales/zh-CN.toml"),
Language::Japanese => include_str!("../../assets/locales/ja.toml"),
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing tests for I18n initialization and language switching only cover English and Chinese languages. Consider adding a test case to verify that Japanese translations can be loaded successfully, similar to the existing test_i18n_initialization test but with Language::Japanese, or extending test_i18n_language_switch to include switching to Japanese.

Copilot uses AI. Check for mistakes.
@ZhBF ZhBF merged commit 347d3bb into main Jan 14, 2026
11 checks passed
@ZhBF ZhBF deleted the ja branch January 14, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant